package com.job.ming.Zuoye0711.oop0711;



import java.util.Scanner;

/**
 * @author Yangmingyu
 * @version 1.0
 * @since 2022-07-11 15:35:32
 *///object里的方法大家都有
public class Tests {
    public static void main(String[] args) {
        //final Animal a=new Cat();
        //a.name="hei";
        Scanner a=new Scanner(System.in);
        Scanner b=new Scanner(System.in);
        //获取a运行时的类                 类的名字
        System.out.println(a.getClass().getName());

        Premier p1=Premier.getInstance();
        Premier p2=Premier.getInstance();

        System.out.println(p1.hashCode());
        System.out.println(p2.hashCode());

        System.out.println(a.hashCode());
        System.out.println(b.hashCode());

        //toString()获取字符串 打印一个引用变量时，默认调用变量.toString 对象的字符串形式
        System.out.println(p1);
        System.out.println(p1.toString());
    }
}